Magproto: c89 fix.
authorrobertl <robertl>
Sat, 1 Jul 2006 22:46:55 +0000 (22:46 +0000)
committerrobertl <robertl>
Sat, 1 Jul 2006 22:46:55 +0000 (22:46 +0000)
Makefile.in: untangle windows executable build somewhat

Makefile.in
magproto.c

index aee46dc63ec5bc42ef0e7cf003bfe441f21b1983..e8163eeedc6eeaac2492c36cbdc3ee082a2e817d 100644 (file)
@@ -162,33 +162,38 @@ WINFILES = gpsbabel.exe mingw/libexpat.dll win32/GPSBabelGUI.exe win32/gui-2/REA
 # in and tagged.
 #
 release-sourcecheck:
-       cvs commit
+#rjl   cvs commit
        ./chkdoc
        make clean
        rm -fr gpsbabel-$(VERSIOND)
-       make gpsbabel doc gpsbabel.html
+#rjl   make gpsbabel doc gpsbabel.html
        @(. tools/functions && ask "Enter 'y' to tag the tree." "y") && cvs tag -F gpsbabel_$(VERSIONU) ; exit 0
-       cvs export -r gpsbabel_$(VERSIONU) -d /tmp/gpsbabel-$(VERSIOND) gpsbabel
-       touch /tmp/gpsbabel-$(VERSIOND)/internal_styles.c
+       cvs export -r gpsbabel_$(VERSIONU) -d gpsbabel-$(VERSIOND) gpsbabel
+       touch gpsbabel-$(VERSIOND)/internal_styles.c
 
 #
 # Build the release tarball from the exported CVS tree, tweaking 
 # timestamps and including generated filess as needed.
 #
 release-tarball: gpsbabel.html
-#      rm -fr /tmp/gpsbabel-$(VERSIOND)
-       cp -ap gpsbabel.html /tmp/gpsbabel-$(VERSIOND)/
-       cd /tmp ; tar czf /tmp/gpsbabel-$(VERSIOND).tar.gz gpsbabel-$(VERSIOND)
+#      rm -fr gpsbabel-$(VERSIOND)
+       cp -ap gpsbabel.html gpsbabel-$(VERSIOND)/
+       tar czf /tmp/gpsbabel-$(VERSIOND).tar.gz gpsbabel-$(VERSIOND)
 #      cd /tmp ; tar xzf gpsbabel-$(VERSIOND).tar.gz
 
 
 #
 # The Windows executables are cross compiled from the exported CVS image.
 # Do the build of that here  and make a zip file for distribution.
+# Do this build in a temporary tree that was a copy of the tagged one
+# to avoid scribbling in the "real" one.
 #
 release-winbuild:
-       cd /tmp/gpsbabel-$(VERSIOND) ; \
-         LDFLAGS="-s" ./configure --target=i386-pc-mingw32 --with-cet=all && make mingw32-cross-build ; \
+       rm -fr /tmp/gpsbabel-$(VERSIOND)-cross
+       cp -a gpsbabel-$(VERSIOND) /tmp/gpsbabel-$(VERSIOND)-cross
+       cd /tmp/gpsbabel-$(VERSIOND)-cross ; \
+         LDFLAGS="-s" ./configure --target=i386-pc-mingw32 --with-cet=all --with-expathdr=mingw/include --with-libexpat=mingw/lib && make mingw32-cross-build && make \
+       
          zip -j /tmp/gpsbabel-$(VERSIOND).zip $(WINFILES)
 
 release-upload:
@@ -217,13 +222,6 @@ msvc-build:
        echo $(OBJS) > objs.lst
        LINK.EXE /NOLOGO @objs.lst ./msvc/expat/libexpat.lib /out:gpsbabel.exe 
 
-# under linux: ./configure --target=i386-pc-mingw32 && make mingw32-cross-build
-mingw32-cross-build: 
-       make \
-         CC=i386-mingw32-gcc \
-         EXEEXT=.exe \
-         EXTRA_LDFLAGS="-Lmingw/lib -Imingw/include " 
-
 # Machine generated from here down. 
 an1.o: an1.c defs.h config.h queue.h gbtypes.h cet.h cet_util.h inifile.h \
   an1sym.h
index 3cfdb0574647010ece15078df78fd841d1b2c9e1..1be3c91967e0374422486baf216b16537bed98b0 100644 (file)
@@ -467,12 +467,13 @@ retry:
                 * Allow lazy allocation of track head.
                 */
                if (trk_head == NULL) {
-                       trk_head = route_head_alloc();
                        /* These tracks don't have names, so derive one
                         * from input filename.
                         */
                        const char *s = strrchr(curfname, GB_PATHSEP);
                        char *e;
+
+                       trk_head = route_head_alloc();
                        if (s) {
                                s++; /* Skip path delim */
                        }  else {